//package com.baidu.shoppingmall.comment.mapper;
//
//import com.baidu.shoppingmall.comment.domain.CommentAggregatePO;
//import org.apache.ibatis.annotations.*;
//
//
///**
// * 评论统计信息管理模块的mapper
// * @author yjf
// *
// */
//@Mapper
//public interface CommentAggregateMapper {
//
//	/**
//	 * 根据商品id查询评论统计信息
//	 * @param goodsId 商品id
//	 * @return 评论统计信息
//	 */
//	@Select("SELECT "
//				+ "id,"
//				+ "goods_id,"
//				+ "total_comment_count,"
//				+ "good_comment_count,"
//				+ "good_comment_rate,"
//				+ "show_pictures_comment_count,"
//				+ "medium_comment_count,"
//				+ "bad_comment_count,"
//				+ "create_time,"
//				+ "update_time"
//			+ "FROM comment_aggregate "
//			+ "WHERE goods_id=#{goodsId}")
//	@Results({
//		@Result(column = "id", property = "id", id = true),
//		@Result(column = "goods_id", property = "goodsId"),
//		@Result(column = "total_comment_count", property = "totalCommentCount"),
//		@Result(column = "good_comment_count", property = "goodCommentCount"),
//		@Result(column = "good_comment_rate", property = "goodCommentRate"),
//		@Result(column = "show_pictures_comment_count", property = "showPicturesCommentCount"),
//		@Result(column = "medium_comment_count", property = "mediumCommentCount"),
//		@Result(column = "bad_comment_count", property = "badCommentCount"),
//		@Result(column = "create_time", property = "createTime"),
//		@Result(column = "update_time", property = "updateTime")
//	})
//    CommentAggregatePO getCommentAggregateByGoodsId(@Param("goodsId") Long goodsId);
//
//	/**
//	 * 新增评论统计信息
//	 * @param commentAggregatePO 评论统计信息DO对象
//	 */
//	@Insert("INSERT INTO comment_aggregate("
//				+ "goods_id,"
//				+ "total_comment_count,"
//				+ "good_comment_count,"
//				+ "good_comment_rate,"
//				+ "show_pictures_comment_count,"
//				+ "medium_comment_count,"
//				+ "bad_comment_count,"
//				+ "create_time,"
//				+ "update_time"
//			+ ") VALUES("
//				+ "#{goodsId},"
//				+ "#{totalCommentCount},"
//				+ "#{goodCommentCount},"
//				+ "#{goodCommentRate},"
//				+ "#{showPicturesCommentCount},"
//				+ "#{mediumCommentCount},"
//				+ "#{badCommentCount},"
//				+ "#{createTime},"
//				+ "#{updateTime}"
//			+ ")")
//	@Options(useGeneratedKeys = true, keyProperty = "id")
//	void saveCommentAggregate(CommentAggregatePO commentAggregatePO);
//
//	/**
//	 * 更新评论统计信息
//	 * @param commentAggregatePO 评论统计信息DO对象
//	 */
//	@Update("UPDATE comment_aggregate SET "
//				+ "goods_id=#{goodsId},"
//				+ "total_comment_count=#{totalCommentCount},"
//				+ "good_comment_count=#{goodCommentCount},"
//				+ "good_comment_rate=#{goodCommentRate},"
//				+ "show_pictures_comment_count=#{showPicturesCommentCount},"
//				+ "medium_comment_count=#{mediumCommentCount},"
//				+ "bad_comment_count=#{badCommentCount},"
//				+ "create_time=#{createTime},"
//				+ "update_time=#{updateTime}"
//			+ "WHERE id=#{id}")
//	void updateCommentAggregate(CommentAggregatePO commentAggregatePO);
//
//}
